/*
 * FormaPiedra.h
 *
 *  Created on: 22/10/2013
 *      Author: ezequiel
 */

#ifndef FORMAPIEDRA_H_
#define FORMAPIEDRA_H_
#include <vector>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/transform2.hpp>
#include <glm/gtx/projection.hpp>
#include <iostream>
#include <fstream>
#include "../Camara.h"
#include "../Dibujable.h"
#include <vector>
#include "../CurvaBessier.h"
#include "../CurvaSpline.h"
using namespace std;
class FormaPiedra : public Dibujable {
public:
	FormaPiedra();
	virtual ~FormaPiedra();
	 void render(GLuint handle, glm::mat4* matModelo);
	 void render(GLuint handle);
	 void indexar();
	 void indexarForma();
	 void calcularNormales();
	 glm::vec3 calcularNormal(glm::vec3, glm::vec3);
private:
	 void crearForma();
		GLfloat* piedra_vertex_buffer;
		GLfloat* piedra_normal_buffer;
		GLuint* piedra_index_buffer;
		unsigned int piedra_vertex_buffer_size;
		unsigned int piedra_normal_buffer_size;
		unsigned int piedra_index_buffer_size;
		GLfloat* piedra_texture_buffer;
};

#endif /* FORMAPIEDRA_H_ */
